<template>
    <div>
        <el-card style="border:none !important;border-radius: 12px;box-shadow:none !important">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item :to="{ path: '/' }">个人中心</el-breadcrumb-item>
                <el-breadcrumb-item>
                    <a href="/">素材管理</a>
                </el-breadcrumb-item>
                <el-breadcrumb-item>我的足迹</el-breadcrumb-item>
            </el-breadcrumb>
            <div class="tab-nav-bd">
                <span class="title">我的足迹</span>
            </div>
        </el-card>
        <el-card style="border:none !important;border-radius: 12px;box-shadow:none !important; margin-top: 20px;">
            <div class="main-box">
                <div class="filter filter-hd f2">
                    <el-input style="max-width: 600px" placeholder="请选择日期">
                        <template #append>搜索</template>
                    </el-input>
                </div>
                <div class="footprint-data">
                    <template v-for="(item) in historyList">
                        <div class="log-time choose-ul"><i></i>{{item['browseTime']}}</div>
                        <ul class="model-list" data-index="0">
                            <li class="choose-img" v-for="(child_item,index) in item['browseProducts']" :key="index">
                                <a href="#" target="_blank">
                                    <img :src="child_item['product']['full_url']" onerror="javascript:this.src='https://static.3d66.com/public/images/common/defaultHead.jpg'"
                                        alt="">
                                </a>
                            </li>
                        </ul>
                    </template>

                </div>
            </div>


        </el-card>
    </div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { myHistory } from '../../api/user/index'
const historyList = ref([])
//足迹
const myList = () => {
    myHistory({}).then(res => {
        if (res.code == 1) {
            historyList.value = res.data.list
        }
    })
}
onMounted(() => {
    myList()
})

</script>
<style scoped>
.tab-nav-bd {
    margin-top: 16px;
}

.tab-nav-bd .title {
    font-size: 18px;
    font-weight: 700;
    color: #1D2129;
    line-height: 26px;
}

.model-list {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-left: 2px;
    padding-left: 13px;
}

.model-list::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    padding: 5px 0;
    width: 1px;
    height: 100%;
    background-color: #E5E6EB;
}

.model-list>li {
    margin: 16px 0 0 16px;
}

.model-list>li>a {
    display: block;
    position: relative;
}

.model-list>li>a img {
    width: 196px;
    height: 147px;
    background: #E5E6EB;
    border-radius: 12px;
}

.filter {
    margin-bottom: 16px;
}

.filter-hd {
    border-bottom: 1px solid #F2F3F5;
}

.f2 {
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.main-box {
    height: 720px;
    overflow: hidden;
}

.footprint-data {
    overflow-y: auto;
    height: 564px;
    margin-right: -24px;
    padding-left: 8px;
    padding-bottom: 100px;
    overflow-x: hidden;
}



.log-time:nth-of-type(1) {
    margin-top: 0;
}

.log-time {
    position: relative;
    margin-top: 16px;
    padding-left: 16px;
    font-size: 16px;
    color: #1D2129;
    line-height: 22px;
}

.log-time>i {
    position: absolute;
    left: 0;
    top: 8px;
    display: inline-block;
    margin-right: 14px;
    width: 6px;
    height: 6px;
    background: #06CD65;
    border-radius: 50%;
}
</style>